package com.example.springbooksystem.model;

import lombok.Data;

/**
 * Created with IntelliJ IDEA.
 * Description：
 *
 * @author: zxj
 * @date: 2024-01-25
 * @time: 16:08:36
 */
@Data
public class PageRequest {
    /*
     * @description:
     * 当前页数
     **/
    private Integer currentPage = 1;
    /*
     * @description:
     * 当前页面的条数
     **/
    private Integer pageSize = 10;

    /**
     * @description:
     * @author: zxj 
     * @date: 2024/1/25 16:11
     * @param: []
     * @return: int 返回偏移量
     **/
    public int getOffset() {
        return (currentPage - 1) * pageSize;
    }
}
